{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "8f46547f",
   "metadata": {},
   "source": [
    "## 1.优化百度asr接口"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "82751735",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "5893708b",
   "metadata": {},
   "outputs": [],
   "source": [
    "API_KEY = 'V5iNAiKgmARc0RoGitFoXkh8'\n",
    "SECRET_KEY = '1ue3uc0oSXLAhRjYMgKSjXm1S6Gc8TwR'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "0c33b7e7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'24.804815cf3637c8d435e3cf4684a42604.2592000.1655292219.282335-26192305'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hai_token = fetch_token(API_KEY,SECRET_KEY)\n",
    "hai_token"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "1ee8b9d8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Request time cost 1.195086\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "'{\"corpus_no\":\"7098294109108947776\",\"err_msg\":\"success.\",\"err_no\":0,\"result\":[\"北京科技馆。\"],\"sn\":\"311078741551652700385\"}\\n'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "asr(token=hai_token,AUDIO_FILE='./yuying/16k.pcm')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ddeb4975",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
